Make sync timeouts configurable#774
Merged
tnull merged 2 commits intolightningdevkit:mainfrom Jan 30, 2026
Merged
Conversation
|
👋 Thanks for assigning @jkczyz as a reviewer! |
Previously, the timeouts applied to chain syncing weren't configurable to users. While historically there were good reasons for this (mostly to avoid leaving the Node in a blocked state for extended periods during chain syncing), by now we should be good to let the users configure timeouts ~freely, if they deem it fit. Here we allow for exactly that. Signed-off-by: Elias Rohrer <[email protected]>
It seems that users often hit these timeouts when running in production, especially when run in sub-optimal network condidtions. Here we considerably bump the timeouts, in the hopes that users now normally shouldn't hit them ever. Signed-off-by: Elias Rohrer <[email protected]>
13ae399 to
40c4b09
Compare
jkczyz
reviewed
Jan 29, 2026
|
|
||
| // The default timeout after which we abort a wallet syncing operation. | ||
| const DEFAULT_BDK_WALLET_SYNC_TIMEOUT_SECS: u64 = 20; | ||
| const DEFAULT_BDK_WALLET_SYNC_TIMEOUT_SECS: u64 = 60; |
Contributor
There was a problem hiding this comment.
If there is an outstanding sync, do we skip a newly requested one?
Collaborator
Author
There was a problem hiding this comment.
Actually no, additional sync calls would subscribe and wait for the the pending sync to finish. The result will then be propagated via propagate_result_to_subscribers:
Lines 56 to 83 in 5d83000
In case of a timeout that would be an Error::TxSyncTimeout.
jkczyz
approved these changes
Jan 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, the timeouts applied to chain syncing weren't configurable
to users. While historically there were good reasons for this (mostly to
avoid leaving the Node in a blocked state for extended periods during
chain syncing), by now we should be good to let the users configure
timeouts ~freely, if they deem it fit. Here we allow for exactly that.
We also bump the previous defaults considerably, in the hopes that users now normally
shouldn't hit them ever.